/**
 * 
 */
package com.pcbly.web.persistence.chart;

import java.util.List;

import com.pcbly.web.bean.chart.ChartStyleCoordinateBean;
import com.pcbly.web.persistence.HibernateBaseDao;

/**
 * @author carl.song
 * @date 2009-7-7
 * @copyright lightsoft
 */
public class ChartStyleCoordinateHibernateDao extends
		HibernateBaseDao<ChartStyleCoordinateBean> implements
		ChartStyleCoordinateDao {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2758684916476114960L;
	public ChartStyleCoordinateHibernateDao(){
		
	}
	
	protected Class<ChartStyleCoordinateBean> getEntityClass(){
		return ChartStyleCoordinateBean.class;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}
	
	@Override
	public int deleteChartStyleCoordinateBean(String id) throws Exception {
		// TODO Auto-generated method stub
		super.removeById(entityClass, id);
		return 1;
	}

	@Override
	public int insertChartStyleCoordinateBean(ChartStyleCoordinateBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		getHibernateTemplate().save(bean);
		return 1;
	}

	@Override
	public ChartStyleCoordinateBean queryChartStyleCoordinateBeanById(String id)
			throws Exception {
		// TODO Auto-generated method stub
		return super.get(entityClass, id);
	}

	@Override
	public int updateChartStyleCoordinateBean(ChartStyleCoordinateBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		getHibernateTemplate().update(bean);
		return 1;
	}

	@Override
	public List<ChartStyleCoordinateBean> queryList() throws Exception {
		// TODO Auto-generated method stub
		return super.getAll(entityClass);
	}

}
